package com.dsbj.mp.icardservice.service.companybus;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsbj.mp.icardservice.entity.companybus.CompanyBus;
import com.dsbj.mp.icardservice.mapper.companybus.CompanyBusMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 公司班车表 服务实现类
 * </p>
 *
 * @author cjw
 * @since 2020-02-25
 */
@Service
@Transactional
public class CompanyBusService extends ServiceImpl<CompanyBusMapper, CompanyBus> {
	
	@Resource
	private CompanyBusMapper companyBusMapper;
	
	
	
	/**
	 * 根据busno获取对应的班车信息。
	 * @param
	 * @return
	 * @author cjw 2020-02-25
	 */
	public CompanyBus getCompanyBusByBusno(String busno){
		QueryWrapper<CompanyBus> queryWrapper=new QueryWrapper<CompanyBus>()
				.eq("BUSNO",busno)
				.eq("STATUS",1);
		CompanyBus companyBus=companyBusMapper.selectOne(queryWrapper);
		return companyBus;
	}
	
	
	
	
}
